package jannex.query;

import jannex.mapping.ResultSetHandler;
import jannex.query.field.Field;

public class Select<E> extends PlannedStatement<E> {

    public Select(ResultSetHandler<E> handler, String... columnNames) {
        super(handler);
    }

    public Select(Class<E> elementClass, String... columnNames) {
        super(elementClass);
    }


//    public Select<T> selectMore(AggregationExpression expression) {
//        return this;
//    }

    public Select<E> distinct() {
        return this;
    }

    public Field<E> columns(String... columnNames) {
        return new Field<>();
    }

    // Duplicated from SelectClause:

    public From<E> from(Table... tables) {
        return new From<>(binding(), tables);
    }

    public From<E> from(String tableName, String alias) {
        return new From<>(tableName, alias);
    }

    public From<E> from(String tableName) {
        return new From<>(tableName);
    }

    public Select<E> from(Select<?> select) {
        throw new UnsupportedOperationException();
    }

    public OrderBy<E> orderBy(String... columnNames) {
        return new OrderBy<>(columnNames);
    }

    public GroupBy<E> groupBy(String... columnNames) {
        return new GroupBy<>(columnNames);
    }
}
